<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <title>Spring SpringMVC 案例首页</title>
    <link rel="stylesheet" href="Jeff/css/common.css">
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
<h1>Hello World!</h1>
<button onclick="ajaxTest()">ajaxTest</button>
<br/>
<a href="http://localhost:8080/ssm/login">登录样例</a>
<hr>
<div>下面是自定义登录表单</div>
<form action="/ssm/login" method="post">
    <label for="username">用户名: </label><input type="text" name="username" id="username" placeholder="请输入用户名">
    <br>
    <label for="password">密码:</label><input type="password" name="password" id="password" placeholder="请输入密码">
    <br>
    <input type="submit" value="点击登录">
</form>

<script>

    function ajaxTest() {
        $.ajax(
            {
                url: "student/2ac98443-1322-451f-895f-79e32d37e237",
                type: "get",
                success: function (res) {
                    alert(JSON.stringify(res))
                }
            }
        )
    }
</script>
</body>
</html>